Skip to content

Conversation

einalien
Copy link
Owner

@einalien einalien commented Nov 1, 2026 •

Summary

Extends the GitHub Actions deployment workflow to generate OpenTofu plans for the TEST environment.

This allows infrastructure changes to be reviewed before enabling automated deployments.

Changes

  • Add automated tofu plan execution for both TEST infrastructure stacks:
    • environments/test/network
    • environments/test/frontend
  • Use the existing Kubernetes remote-state backend.
  • Enable state locking during planning.
  • Use -detailed-exitcode to distinguish between:
    • No infrastructure changes (0).
    • Planning errors (1).
    • Infrastructure changes detected (2).
  • Report detected changes as workflow warnings.
  • Fail the workflow if planning encounters an error.
  • Preserve the existing Kubernetes credential cleanup process.

Verification

  • Existing CI checks passed.
  • Verified Kubernetes API connectivity and authentication.
  • Verified access to both TEST remote-state stacks.
  • Verify successful OpenTofu planning for the TEST network stack.
  • Verify successful OpenTofu planning for the TEST frontend stack.
  • Review any proposed infrastructure changes.

Next Steps

  • Resolve unexpected infrastructure changes or configuration differences.
  • Implement automated TEST network and frontend deployments.
  • Extend deployment automation to STAGE and PROD.
  • Configure manual approval for PROD deployments.
  • Implement selective and full infrastructure destruction.

Notes

This PR introduces infrastructure planning only. No resources are created, modified, or destroyed.

The workflow may succeed when changes are detected, so both plan outputs must be reviewed before enabling automated tofu apply.

@einalien einalien added the enhancement New feature or request label Nov 1, 2026
@einalien einalien self-assigned this Nov 1, 2026
@einalien einalien merged commit 26a2a5c into main Nov 1, 2026
1 check passed
@einalien einalien deleted the feat/test-infrastructure-plan branch November 1, 2026 19:02
Sign in to join this conversation on GitHub.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant